<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>회원정보수정</title>
<script type="text/javascript">
function formCheck(){
	var form = window.document.f1;
	
	if(!form.password.value){
		alert("패스워드를 넣으세요");
		form.password.focus();
		return false;
	}
	if(!form.name.value){
		alert("이름을 넣으세요");
		form.name.focus();
		return false;
	}
	if(!form.registerNumber1.value){
		alert("주민번호 앞자리를 넣으세요");
		form.registerNumber1.focus();
		return false;
	}
	if(!form.registerNumber2.value){
		alert("주민번호 뒷자리를 넣으세요");
		form.registerNumber2.focus();
		return false;
	}
}
</script>
</head>
<body>

<h2>회원정보 수정 폼</h2>

<form method="post" action="/MemberManagerFC_iBatis_spring_insts/forward.jsp" name="f1"
		  onsubmit="return formCheck()" >
<input type="hidden" name="command" value="modifyMember">
<input type="hidden" name="id" value="${sessionScope.login_info.id }">
	<table width='500'>
		<tr>
			<td>ID</td>
			<td>${sessionScope.login_info.id }</td>
		</tr>
		<tr>
			<td>Password</td>
			<td>
				<input type="password" name="password">
			</td>
		</tr>
		<tr>
			<td>이름</td>
			<td>
				<input type="text" name="name" value="${sessionScope.login_info.name }">
			</td>
		</tr>
		<tr>
			<td>주민번호</td>
			<td>
				<input type="text" name="registerNumber1"  value="${sessionScope.login_info.registerNumber1 }" maxlength="6">-
				<input type="text" name="registerNumber2"  value="${sessionScope.login_info.registerNumber2 }" maxlength="7">
			</td>
		</tr>
		<tr> 
			<td colspan="2" >
				<input type="submit" value="수정">
				<input type="reset" value="다시작성">
			</td>
		</tr>
	</table>
</form>
</body>
</html>